package com.wing.product.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description="生产计划明细表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_production_scheduling_plan_detail")
public class WarehouseProductionSchedulingPlanDetail extends BaseEntity<WarehouseProductionSchedulingPlanDetail> {

    @TableField(value = "warehouse_production_scheduling_plan_id")
    @Schema(description="生产计划id")
    private Long warehouseProductionSchedulingPlanId;

    @TableField(value = "workshop_id")
    @Schema(description="工位id")
    private Long workshopId;

    @TableField(value = "workshop_name")
    @Schema(description="车间名称")
    private String workshopName;

    @TableField(value = "production_line_name")
    @Schema(description="产线名称")
    private String productionLineName;

    @TableField(value = "production_line_id")
    @Schema(description="产线id")
    private Long productionLineId;

    @TableField(value = "planned_production_time")
    @Schema(description="计划生产时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime plannedProductionTime;

    @TableField(value = "planned_quantity")
    @Schema(description="计划生产数量")
    private Integer plannedQuantity;

    @TableField(value = "status")
    @Schema(description="状态1.待审核，2.待激活，3.待领料，4.待报工，5.生产中，6.暂停，7.终止，8.完成")
    private String status;

    @TableField(value = "salary_quota")
    @Schema(description="工资定额")
    private BigDecimal salaryQuota;

    @TableField(value = "customer_id")
    @Schema(description="客户id")
    private Long customerId;

    @TableField(value = "code")
    @Schema(description="制令单编号")
    private String code;

    @TableField(value = "processing_report_number")
    @Schema(description="报工数量")
    private Integer processingReportNumber;

    @TableField(value = "quality_testing_qualified_number")
    @Schema(description="质检合格数")
    private Integer qualityTestingQualifiedNumber;

    @TableField(value = "quality_testing_unqualified_number")
    @Schema(description="质检不合格数")
    private Integer qualityTestingUnqualifiedNumber;

    @TableField(value = "finished_product_number")
    @Schema(description="成品入库数")
    private Integer finishedProductNumber;

    @TableField(value = "product_spec_code")
    @Schema(description="规格")
    private String productSpecCode;

    @TableField(value = "diameter")
    @Schema(description="厚度/壁厚/直径")
    private String diameter;

    @TableField(value = "warehouse_width")
    @Schema(description="宽度/外径")
    private String warehouseWidth;

    @TableField(value = "warehouse_length")
    @Schema(description="长度")
    private String warehouseLength;

    @TableField(value = "bundle_quantity")
    @Schema(description="捆包件数")
    private Integer bundleQuantity;

    @TableField(value = "bundle_sum")
    @Schema(description="捆包数量")
    private Integer bundleSum;

    @TableField(value = "material_number")
    @Schema(description="材料料号")
    private String materialNumber;

}
